package br.com.veterinariavillage.view.Veterinario;

import javax.swing.*;
import javax.swing.GroupLayout.Alignment;
import java.awt.Component;
import javax.swing.LayoutStyle.ComponentPlacement;

@SuppressWarnings("serial")
public class BotoesTabelaVeterinario extends JPanel {
    private JButton btCancelar;
    private JButton btOk;
    
    public BotoesTabelaVeterinario() {
        inicializarComponentes();
    }

    private void inicializarComponentes() {

        btCancelar = new JButton();
        btOk = new JButton();

        btCancelar.setText("Cancelar");
        btCancelar.setToolTipText("");

        btOk.setText("OK");
        btOk.setToolTipText("");

        GroupLayout layout = new GroupLayout(this);
        layout.setHorizontalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(Alignment.TRAILING, layout.createSequentialGroup()
        			.addContainerGap(188, Short.MAX_VALUE)
        			.addComponent(btCancelar, GroupLayout.PREFERRED_SIZE, 94, GroupLayout.PREFERRED_SIZE)
        			.addPreferredGap(ComponentPlacement.RELATED)
        			.addComponent(btOk, GroupLayout.PREFERRED_SIZE, 92, GroupLayout.PREFERRED_SIZE)
        			.addContainerGap())
        );
        layout.setVerticalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(layout.createSequentialGroup()
        			.addContainerGap()
        			.addGroup(layout.createParallelGroup(Alignment.LEADING)
        				.addComponent(btOk)
        				.addComponent(btCancelar))
        			.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.linkSize(SwingConstants.VERTICAL, new Component[] {btCancelar, btOk});
        layout.linkSize(SwingConstants.HORIZONTAL, new Component[] {btCancelar, btOk});
        this.setLayout(layout);
    }
}

